/*
 * ExtractorAnalyzer.h
 *
 *  Created on: Nov 20, 2008
 *      Author: Ryan
 */

#ifndef EXTRACTORANALYZER_H_
#define EXTRACTORANALYZER_H_


#include "../../../OOInterface/Interfaces/UnitVisitor.h"
#include "../../../OOInterface/AIInterface.h"

class ExtractorAnalyzer : public OOInterface::UnitVisitor
{
public:
	ExtractorAnalyzer( OOInterface::AIInterface* i, OOInterface::ConstPlayerPtr self );
	virtual ~ExtractorAnalyzer();

	virtual void visitUnit( const OOInterface::Unit& u );

	virtual void visitAirAspect( const OOInterface::AirAspect& a );
	virtual void visitLandAspect( const OOInterface::LandAspect& a );
	virtual void visitWaterAspect( const OOInterface::WaterAspect& a );

	virtual void visitBuilderAspect( const OOInterface::BuilderAspect& a );
	virtual void visitBuildingAspect( const OOInterface::BuildingAspect& a );
	virtual void visitTransportAspect( const OOInterface::TransportAspect& a );

	virtual void visitReclaimableAspect( const OOInterface::ReclaimableAspect& a );
	virtual void visitResourceExtractorAspect( const OOInterface::ResourceExtractorAspect& a );

	void reset( OOInterface::Point3f loc ) { _rating = 0.0f; _loc = loc; }
	float getRating() { return _rating; }

private:
	float _rating;

	OOInterface::Point3f _loc;

	OOInterface::AIInterface* _i;
	OOInterface::ConstPlayerPtr _self;
};

#endif /* EXTRACTORANALYZER_H_ */
